package com.zhongying.sys.entity;


import java.io.Serializable;

/**
 * 系统配置信息
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2016年12月4日 下午6:43:36
 */
public class SysConfigEntity implements Serializable,Comparable<SysConfigEntity>{
	private static final long serialVersionUID = -302214974145848964L;
	private Long id;
	private String code;
	private Integer key;
	private String value; 
	private String remark;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Integer getKey() {
		return key;
	}

	public void setKey(Integer key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public int compareTo(SysConfigEntity o) {
		int i = this.key - o.getKey();
		if(i == 0){
			i = Integer.parseInt(String.valueOf(this.id)) - Integer.parseInt(String.valueOf(o.getId()));
		}
		return i;
	}
}
